<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-10-19 10:17:20
 * @Description: 门店所有员工操作记录表
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-10-20 09:12:37
 * @FilePath: /归档/user/2021_10_19_101720_create_shop_log.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateShopLog extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_logs', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->foreignId('shop_user_id')->default(0)->comment('店铺员工ID');
            $table->string('shop_user_name',50)->nullable()->comment('店铺员工名');
            $table->string('method', 50)->comment('操作方式');
            $table->string('url',255)->comment('路径');
            $table->text('data')->nullable()->comment('详情');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_logs');
    }
}
